CMS Configuration and Setup

**Referenced Files in This Document** - [package.json](file://package.json) - [tina/config.ts](file://tina/config.ts) - [src/admin/config.yml](file://src/admin/config.yml) - [src/admin/index.html](file://src/admin/index.html) - [cloudflare-pages.toml](file://cloudflare-pages.toml) - [netlify.toml](file://netlify.toml) - [wrangler.jsonc](file://wrangler.jsonc) - [worker.js](file://worker.js) - [.eleventy.js](file://.eleventy.js) - [README.md](file://README.md) - [src/content/knowledge/knowledge.11tydata.js](file://src/content/knowledge/knowledge.11tydata.js) - [src/_includes/layouts/knowledge.njk](file://src/_includes/layouts/knowledge.njk) - [src/alliance-knowledge.njk](file://src/alliance-knowledge.njk) - [src/staff-knowledge.njk](file://src/staff-knowledge.njk) - [src/staff-knowledge-graph.njk](file://src/staff-knowledge-graph.njk) - [src/content/knowledge/write-your-first-article.md](file://src/content/knowledge/write-your-first-article.md) - [src/content/knowledge/review-and-publish-workflow.md](file://src/content/knowledge/review-and-publish-workflow.md)

Update Summary

Changes Made

  • Added comprehensive knowledge base workflow documentation with status tracking (draft → review → published → archived)
  • Integrated audience segmentation system (staff, members, both) with portal-specific access controls
  • Enhanced content categorization with hierarchical taxonomy (category → subcategory → tags)
  • Added knowledge graph visualization for content relationship mapping
  • Updated TinaCMS schema to support advanced metadata fields and workflow automation
  • Implemented portal-specific knowledge base collections and filtering logic

Table of Contents

  1. Introduction
  2. Project Structure
  3. Core Components
  4. Architecture Overview
  5. Detailed Component Analysis
  6. Knowledge Management Workflows
  7. Audience Segmentation System
  8. Content Categorization Framework
  9. Knowledge Base Visualization
  10. Dependency Analysis
  11. Performance Considerations
  12. Troubleshooting Guide
  13. Conclusion
  14. Appendices

Introduction

This document explains how to configure and operate the Sveltia CMS within the Ace Strategies Prime platform, with enhanced focus on knowledge management workflows, status tracking, audience segmentation, and content categorization. The platform now features a sophisticated knowledge base system with four-stage publishing workflows, audience-aware content delivery, and advanced content discovery through categorization and relationship mapping.

Project Structure

The CMS is integrated with Eleventy and deployed via Cloudflare Workers and Assets, featuring separate portals for staff and members with distinct knowledge base access. The key configuration areas include:

  • TinaCMS configuration with enhanced knowledge base schema
  • Sveltia CMS admin entrypoint
  • Eleventy build pipeline with portal-specific collections
  • Cloudflare Worker for authentication and API routes
  • Knowledge base visualization with D3.js graph
  • Audience segmentation and workflow automation
graph TB
subgraph "Build Pipeline"
ELE[".eleventy.js<br/>Build config and portal collections"]
PKG["package.json<br/>Scripts and dependencies"]
end
subgraph "CMS Config"
TCFG["tina/config.ts<br/>Enhanced knowledge base schema"]
YML["src/admin/config.yml<br/>Legacy YAML config"]
ADMIN["src/admin/index.html<br/>Sveltia CMS entry"]
end
subgraph "Portal Systems"
STAFF["Staff Portal<br/>/staff/ - All statuses"]
MEMBERS["Members Portal<br/>/alliance/members/ - Published/Review"]
GRAPH["Knowledge Graph<br/>D3.js visualization"]
end
subgraph "Deployment"
WRG["wrangler.jsonc<br/>Assets binding and secrets"]
WKR["worker.js<br/>Auth and API routes"]
CF["cloudflare-pages.toml<br/>Pages fallback"]
NL["netlify.toml<br/>Redirects and headers"]
end
PKG --> ELE
TCFG --> ELE
YML --> TCFG
ADMIN --> TCFG
ELE --> WRG
WRG --> WKR
CF --> WRG
NL --> WRG
STAFF --> ELE
MEMBERS --> ELE
GRAPH --> ELE

Diagram sources

  • [package.json:1-32](file://package.json#L1-L32)
  • [.eleventy.js:1-283](file://.eleventy.js#L1-L283)
  • [tina/config.ts:1-425](file://tina/config.ts#L1-L425)
  • [src/admin/config.yml:1-774](file://src/admin/config.yml#L1-L774)
  • [src/admin/index.html:1-12](file://src/admin/index.html#L1-L12)
  • [wrangler.jsonc:1-35](file://wrangler.jsonc#L1-L35)
  • [worker.js:1-321](file://worker.js#L1-L321)
  • [cloudflare-pages.toml:1-17](file://cloudflare-pages.toml#L1-L17)
  • [netlify.toml:1-26](file://netlify.toml#L1-L26)

Section sources

  • [package.json:1-32](file://package.json#L1-L32)
  • [.eleventy.js:1-283](file://.eleventy.js#L1-L283)
  • [tina/config.ts:1-425](file://tina/config.ts#L1-L425)
  • [src/admin/config.yml:1-774](file://src/admin/config.yml#L1-L774)
  • [src/admin/index.html:1-12](file://src/admin/index.html#L1-L12)
  • [wrangler.jsonc:1-35](file://wrangler.jsonc#L1-L35)
  • [worker.js:1-321](file://worker.js#L1-L321)
  • [cloudflare-pages.toml:1-17](file://cloudflare-pages.toml#L1-L17)
  • [netlify.toml:1-26](file://netlify.toml#L1-L26)

Core Components

  • Enhanced TinaCMS configuration with comprehensive knowledge base schema supporting status tracking, audience segmentation, and content categorization
  • Dual portal architecture with staff portal (unified access) and members portal (audience-aware)
  • Advanced workflow system with four-stage publishing pipeline (draft → review → published → archived)
  • Knowledge graph visualization using D3.js for content relationship mapping
  • Portal-specific collections with filtering logic for different access levels
  • Automated status management with build-time filtering and collection exclusion

Section sources

  • [tina/config.ts:95-201](file://tina/config.ts#L95-L201)
  • [src/content/knowledge/knowledge.11tydata.js:1-42](file://src/content/knowledge/knowledge.11tydata.js#L1-L42)
  • [src/_includes/layouts/knowledge.njk:1-157](file://src/_includes/layouts/knowledge.njk#L1-L157)
  • [src/alliance-knowledge.njk:1-274](file://src/alliance-knowledge.njk#L1-L274)
  • [src/staff-knowledge.njk:1-270](file://src/staff-knowledge.njk#L1-L270)
  • [src/staff-knowledge-graph.njk:1-245](file://src/staff-knowledge-graph.njk#L1-L245)

Architecture Overview

The CMS architecture now supports a sophisticated knowledge management system with separate portals, workflow automation, and content relationship visualization. The staff portal provides comprehensive access to all content statuses while the members portal delivers audience-appropriate content.

sequenceDiagram
participant Staff as "Staff Portal User"
participant Members as "Members Portal User"
participant CMS as "Sveltia CMS"
participant Worker as "Cloudflare Worker"
participant Graph as "Knowledge Graph"
participant Build as "Eleventy Build"
Staff->>CMS : "Access /staff/knowledge/"
CMS-->>Staff : "Show all statuses (draft, review, published, archived)"
Staff->>CMS : "Create/Edit Knowledge Article"
CMS->>Worker : "Commit changes to repository"
Worker-->>Build : "Trigger build"
Build-->>Graph : "Update knowledge graph data"
Graph-->>Staff : "Real-time graph updates"
Members->>CMS : "Access /alliance/members/knowledge/"
CMS-->>Members : "Show published/review articles (audience-aware)"
Members->>CMS : "Search/Filter by category/tags"
CMS-->>Members : "Filtered results with status badges"

Diagram sources

  • [src/staff-knowledge.njk:8-20](file://src/staff-knowledge.njk#L8-L20)
  • [src/content/knowledge/knowledge.11tydata.js:13-29](file://src/content/knowledge/knowledge.11tydata.js#L13-L29)
  • [src/_includes/layouts/knowledge.njk:52-58](file://src/_includes/layouts/knowledge.njk#L52-L58)
  • [src/staff-knowledge-graph.njk:52-66](file://src/staff-knowledge-graph.njk#L52-L66)

Detailed Component Analysis

Enhanced TinaCMS Configuration (tina/config.ts)

The knowledge base schema now includes comprehensive metadata fields for workflow management and audience targeting:

Status Tracking Fields:

  • status: Four-stage workflow (draft, review, published, archived)
  • Automatic default status set to 'draft' for new articles
  • Required status field with predefined options and labels

Content Classification:

  • category: Primary subject area (Government Relations, Strategic Communications, etc.)
  • subcategory: Secondary classification level
  • tags_list: Multiple keyword tags for fine-grained filtering
  • content_type: Article type classification (Briefing Note, How-To Guide, etc.)
  • difficulty: Skill level indicator (Beginner, Intermediate, Advanced, Expert)

Audience Segmentation:

  • audience: Content visibility control (both, staff, members)
  • Portal-specific visibility rules based on audience field
  • Staff-only articles hidden from member portal

Advanced Features:

  • related_articles: Bidirectional content linking
  • featured: Promotional content flag
  • table_of_contents: Auto-generated navigation
  • seo_description, noindex: SEO optimization controls
flowchart TD
Start(["Knowledge Base Schema"]) --> Status["Status Tracking<br/>draft → review → published → archived"]
Start --> Category["Content Categorization<br/>category → subcategory → tags"]
Start --> Audience["Audience Segmentation<br/>both → staff → members"]
Start --> Type["Content Types<br/>Briefing Note → How-To Guide → etc."]
Start --> Advanced["Advanced Features<br/>related_articles → SEO → Relationships"]
Status --> Build["Build-Time Filtering<br/>Production excludes drafts/archived"]
Category --> Search["Search & Discovery<br/>Category/tag filtering"]
Audience --> Portal["Portal Routing<br/>Staff vs Members"]
Type --> UX["User Experience<br/>Difficulty indicators"]
Advanced --> Graph["Graph Visualization<br/>Content relationships"]

Diagram sources

  • [tina/config.ts:99-200](file://tina/config.ts#L99-L200)
  • [src/content/knowledge/knowledge.11tydata.js:13-29](file://src/content/knowledge/knowledge.11tydata.js#L13-L29)
  • [src/_includes/layouts/knowledge.njk:52-58](file://src/_includes/layouts/knowledge.njk#L52-L58)

Section sources

  • [tina/config.ts:95-201](file://tina/config.ts#L95-L201)
  • [tina/config.ts:104-176](file://tina/config.ts#L104-L176)
  • [tina/config.ts:177-199](file://tina/config.ts#L177-L199)

Knowledge Base Template System

The knowledge base uses a sophisticated template system with portal-specific layouts and filtering:

Member Portal Template (knowledge.njk):

  • Audience-aware rendering with status badges
  • SEO optimization with structured data
  • Breadcrumb navigation with category awareness
  • Status-specific styling and messaging
  • Featured image handling and alt text support

Staff Portal Template (staff-knowledge.njk):

  • Comprehensive article listing with status filtering
  • Category-based grouping and sorting
  • Difficulty level indicators
  • Related article previews
  • Status badges with color coding

Graph Visualization (staff-knowledge-graph.njk):

  • D3.js force-directed graph of content relationships
  • Category-based color coding
  • Status-based opacity mapping
  • Interactive tooltips with article details
  • Real-time graph updates from knowledge data

Section sources

  • [src/_includes/layouts/knowledge.njk:1-157](file://src/_includes/layouts/knowledge.njk#L1-L157)
  • [src/alliance-knowledge.njk:1-274](file://src/alliance-knowledge.njk#L1-L274)
  • [src/staff-knowledge.njk:1-270](file://src/staff-knowledge.njk#L1-L270)
  • [src/staff-knowledge-graph.njk:1-245](file://src/staff-knowledge-graph.njk#L1-L245)

Knowledge Management Workflows

The platform implements a four-stage publishing workflow designed to ensure quality while maintaining efficiency:

Stage 1: Draft (✏️)

  • Author creates and develops content privately
  • Drafts are visible only in CMS and local development
  • Hidden from production site at build-time
  • Ideal for initial ideation and rough drafts

Stage 2: Review (👁️)

  • Colleagues review content for accuracy and quality
  • Reviewers provide feedback and approve publication
  • Maintains audit trail with reviewer attribution
  • Prepares content for public consumption

Stage 3: Published (✅)

  • Content becomes live on production site
  • Visible to appropriate audience (members or both)
  • Indexed by search engines unless flagged otherwise
  • Triggers automatic graph updates and notifications

Stage 4: Archived (📦)

  • Content preserved for historical reference
  • Removed from active index and search results
  • Can be restored by changing status back to published
  • Useful for deprecated but historically important content
stateDiagram-v2
draft : Draft (✏️)
review : Review (👁️)
published : Published (✅)
archived : Archived (📦)
[*] --> draft
draft --> review : Review requested
review --> published : Approved
review --> draft : Feedback requested
published --> archived : Content outdated
published --> draft : Major revision needed
archived --> draft : Restore for updates

Diagram sources

  • [src/content/knowledge/review-and-publish-workflow.md:40-46](file://src/content/knowledge/review-and-publish-workflow.md#L40-L46)
  • [src/content/knowledge/review-and-publish-workflow.md:143-187](file://src/content/knowledge/review-and-publish-workflow.md#L143-L187)

Section sources

  • [src/content/knowledge/review-and-publish-workflow.md:1-278](file://src/content/knowledge/review-and-publish-workflow.md#L1-L278)
  • [src/content/knowledge/write-your-first-article.md:1-245](file://src/content/knowledge/write-your-first-article.md#L1-L245)

Audience Segmentation System

The platform implements a three-tier audience segmentation system to control content visibility across portals:

Audience Values:

  • both: Visible to staff and members (default)
  • staff: Internal-only content, hidden from member portal
  • members: Member-only content, hidden from staff portal

Portal-Specific Behavior:

  • Staff Portal (/staff/): Shows all statuses (draft, review, published, archived) for staff and both audiences
  • Members Portal (/alliance/members/): Filters to published/review status with members and both audiences
  • Build-Time Filtering: Production builds exclude non-published content from collections while preserving individual page files

Implementation Details:

  • Audience field validation in CMS schema
  • Portal-specific collection filtering logic
  • Status-based visibility rules
  • SEO considerations with noindex field for hidden content

Section sources

  • [tina/config.ts:166-176](file://tina/config.ts#L166-L176)
  • [src/content/knowledge/knowledge.11tydata.js:13-29](file://src/content/knowledge/knowledge.11tydata.js#L13-L29)
  • [src/_includes/layouts/knowledge.njk:52-58](file://src/_includes/layouts/knowledge.njk#L52-L58)

Content Categorization Framework

The knowledge base employs a hierarchical categorization system for improved content organization and discovery:

Primary Taxonomy:

  • Category: Broad subject area (Government Relations, Strategic Communications, etc.)
  • Subcategory: Specific focus within category
  • Tags: Multiple keywords for fine-grained filtering

Content Type Classification:

  • Briefing Note: Concise executive summaries
  • Research Report: Comprehensive analytical content
  • How-To Guide: Step-by-step instructions
  • Policy Analysis: Regulatory and policy discussions
  • Case Study: Real-world examples and outcomes
  • Reference Material: Standard operating procedures
  • Template: Reusable content frameworks
  • Training Resource: Educational materials

Difficulty Levels:

  • Beginner: Basic concepts and introductions
  • Intermediate: Some prior knowledge required
  • Advanced: Specialized expertise needed
  • Expert: Highly specialized technical content

Implementation Features:

  • Automatic breadcrumb navigation based on category hierarchy
  • Dynamic filtering by category, type, and tags
  • Tag cloud for quick content discovery
  • Related article suggestions based on shared tags

Section sources

  • [tina/config.ts:124-165](file://tina/config.ts#L124-L165)
  • [src/alliance-knowledge.njk:96-113](file://src/alliance-knowledge.njk#L96-L113)
  • [src/staff-knowledge.njk:87-101](file://src/staff-knowledge.njk#L87-L101)

Knowledge Base Visualization

The platform includes advanced visualization tools for content relationship mapping and discovery:

Knowledge Graph Features:

  • Force-Directed Layout: D3.js-powered interactive graph
  • Category Color Coding: Unique colors for each content category
  • Status-Based Opacity: Visual indication of content lifecycle stage
  • Interactive Nodes: Click to open articles, hover for details
  • Real-time Updates: Graph refreshes with content changes

Graph Data Structure:

  • Nodes: Articles with title, URL, category, status, tags, content type
  • Edges: Connections based on related_article field relationships
  • Degree Calculation: Node size based on number of connections
  • Legend System: Category color legend and status key

Staff Portal Integration:

  • Dedicated /staff/knowledge/graph/ endpoint
  • Toggle between list view and graph view
  • Reset zoom functionality
  • Responsive design for different screen sizes

Section sources

  • [src/staff-knowledge-graph.njk:1-245](file://src/staff-knowledge-graph.njk#L1-L245)
  • [src/staff-knowledge.njk:33-40](file://src/staff-knowledge.njk#L33-L40)

Dependency Analysis

The enhanced CMS system introduces several new dependencies and integrations:

Core Dependencies:

  • TinaCMS CLI and runtime for admin generation and editing
  • Eleventy for static site generation with portal-specific collections
  • Cloudflare Worker and Assets for serving the site and handling auth/API routes
  • D3.js for knowledge graph visualization
  • Optional GitHub OAuth for legacy integrations

New Integrations:

  • Portal Collections: Separate staffKnowledge and knowledge collections
  • Build-Time Filtering: Status-based content exclusion logic
  • Graph Data Processing: JavaScript-based knowledge graph generation
  • Audience-Aware Rendering: Template-level audience validation
graph LR
TCFG["tina/config.ts<br/>Enhanced schema"] --> CLI["@tinacms/cli"]
TCFG --> RUNTIME["Sveltia Runtime"]
CLI --> ADMINBUNDLE["Admin Bundle"]
ELE["Eleventy<br/>Portal collections"] --> SITE["_site/"]
ADMINBUNDLE --> SITE
SITE --> ASSETS["Cloudflare Assets"]
ASSETS --> WORKER["worker.js<br/>Auth + APIs"]
WORKER --> GRAPH["D3.js Graph<br/>Knowledge relationships"]
WORKER --> AUTH["Member Auth + APIs"]

Diagram sources

  • [package.json:25-30](file://package.json#L25-L30)
  • [tina/config.ts:1-425](file://tina/config.ts#L1-L425)
  • [.eleventy.js:1-283](file://.eleventy.js#L1-L283)
  • [wrangler.jsonc:9-12](file://wrangler.jsonc#L9-L12)
  • [worker.js:301-320](file://worker.js#L301-L320)
  • [src/staff-knowledge-graph.njk:69](file://src/staff-knowledge-graph.njk#L69)

Section sources

  • [package.json:14-30](file://package.json#L14-L30)
  • [tina/config.ts:1-425](file://tina/config.ts#L1-L425)
  • [.eleventy.js:1-283](file://.eleventy.js#L1-L283)
  • [wrangler.jsonc:1-35](file://wrangler.jsonc#L1-L35)
  • [worker.js:1-321](file://worker.js#L1-L321)

Performance Considerations

Enhanced performance optimizations for the knowledge base system:

Knowledge Graph Optimization:

  • Efficient D3.js force simulation with collision detection
  • Lazy loading of graph data via build-time injection
  • Responsive SVG scaling for different viewport sizes
  • Optimized node degree calculation for dynamic sizing

Portal-Specific Performance:

  • Separate collections reduce query complexity
  • Build-time filtering minimizes runtime processing
  • Status-based exclusions reduce content processing overhead
  • Graph updates triggered only on data changes

Asset Management:

  • Keep mediaRoot aligned with publicFolder mapping for optimal asset resolution
  • Use Eleventy's production transforms and minification for HTML/CSS/JS
  • Cache-control headers for assets configured in deployment configs
  • Knowledge graph data cached in browser localStorage for subsequent visits

Troubleshooting Guide

Common configuration issues and resolutions for the enhanced knowledge base system:

Knowledge Base Workflow Issues:

  • Articles not appearing in member portal: Verify status is 'published' or 'review' and audience includes 'members' or 'both'
  • Draft articles visible in production: Check build-time filtering logic and NODE_ENV settings
  • Workflow status not updating: Ensure status field is properly formatted and saved in CMS
  • Archived articles still accessible: Verify status filtering and permalink generation logic

Audience Segmentation Problems:

  • Content visible to wrong audience: Check audience field values and portal-specific collection filtering
  • Staff portal missing content: Verify staffKnowledge collection includes all required fields
  • Graph visualization not loading: Ensure D3.js library is properly loaded and graph data is injected

Content Categorization Issues:

  • Incorrect category filtering: Verify category/subcategory/tag values match schema options
  • Search not finding articles: Check tag formatting and search indexing configuration
  • Related articles not connecting: Ensure related_article field contains valid article URLs

Knowledge Graph Problems:

  • Graph not rendering: Check D3.js library loading and SVG container availability
  • Missing connections: Verify related_article field contains valid article titles
  • Performance issues: Monitor node count and optimize graph data processing

Section sources

  • [README.md:497-521](file://README.md#L497-L521)
  • [README.md:523-588](file://README.md#L523-L588)
  • [tina/config.ts:3-20](file://tina/config.ts#L3-L20)
  • [wrangler.jsonc:17-34](file://wrangler.jsonc#L17-L34)
  • [netlify.toml:13-26](file://netlify.toml#L13-L26)
  • [src/content/knowledge/knowledge.11tydata.js:13-29](file://src/content/knowledge/knowledge.11tydata.js#L13-L29)

Conclusion

The enhanced Sveltia CMS integration in Ace Strategies Prime provides a comprehensive knowledge management platform with sophisticated workflow automation, audience segmentation, and content discovery capabilities. The dual portal architecture with separate staff and members access, combined with the four-stage publishing workflow and knowledge graph visualization, creates a powerful system for managing organizational knowledge while maintaining appropriate access controls and content quality standards.

Appendices

Step-by-Step Setup Instructions

Local Development

  1. Install dependencies and run Eleventy in serve mode
  2. Build the CMS admin bundle locally if needed
  3. Access staff portal at /staff/ for full knowledge base access
  4. Access members portal at /alliance/members/ for published content
  5. Open the admin UI at the configured path for content management

Production Deployment

  1. Build the site and admin bundle
  2. Deploy via Wrangler to bind Assets and run the Worker
  3. Configure secrets and KV namespaces for member authentication and APIs
  4. Verify portal-specific collections are properly filtered
  5. Test knowledge graph functionality and audience segmentation

Environment Variables and Secrets

  • Worker secrets include session keys, Resend API key, and Google Sheets credentials
  • Optional TinaCMS variables for local admin builds
  • Knowledge base requires proper NODE_ENV for build-time filtering

Section sources

  • [package.json:5-12](file://package.json#L5-L12)
  • [README.md:523-588](file://README.md#L523-L588)
  • [README.md:497-521](file://README.md#L497-L521)

Customization Examples

Extend Knowledge Base Schema

  • Add new category options in the knowledge base schema
  • Create custom content types for specialized article formats
  • Implement additional metadata fields for specific use cases
  • Extend audience segmentation for additional access levels

Customize Workflow Logic

  • Modify status transition rules in the workflow documentation
  • Add custom approval workflows for sensitive content
  • Implement additional review stages for complex content types
  • Create custom notification systems for workflow events

Enhance Content Discovery

  • Add custom search filters based on new metadata fields
  • Implement faceted search with additional category dimensions
  • Create custom content recommendation algorithms
  • Add sentiment analysis for content categorization

Section sources

  • [tina/config.ts:95-201](file://tina/config.ts#L95-L201)
  • [src/content/knowledge/review-and-publish-workflow.md:1-278](file://src/content/knowledge/review-and-publish-workflow.md#L1-L278)
  • [src/alliance-knowledge.njk:96-113](file://src/alliance-knowledge.njk#L96-L113)
  • [src/staff-knowledge-graph.njk:73-92](file://src/staff-knowledge-graph.njk#L73-L92)